Make sure only one xenpaging binary is active per domain.
Print info when the host lacks the required features for xenpaging.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Already-Acked-by: Patrick Colp <pjcolp@cs.ubc.ca>
Already-Acked-by: Keir Fraser <keir.fraser@citrix.com>
paging->mem_event.ring_page);
if ( rc != 0 )
{
- ERROR("Error initialising shared page");
+ switch ( errno ) {
+ case EBUSY:
+ ERROR("xenpaging is (or was) active on this domain");
+ break;
+ case ENODEV:
+ ERROR("EPT not supported for this guest");
+ break;
+ default:
+ perror("Error initialising shared page");
+ break;
+ }
goto err;
}
mfn_t ring_mfn;
mfn_t shared_mfn;
+ /* Only one xenpaging at a time. If xenpaging crashed,
+ * the cache is in an undefined state and so is the guest
+ */
+ rc = -EBUSY;
+ if ( d->mem_event.ring_page )
+ break;
+
/* Currently only EPT is supported */
rc = -ENODEV;
if ( !(hap_enabled(d) &&